package com.xinqi.modules.sys.dict.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.sys.dict.domain.DictGradeEntity;
import com.xinqi.modules.sys.dict.dto.req.DictGradeCreateDTO;
import com.xinqi.modules.sys.dict.dto.req.DictGradeUpdateDTO;
import com.xinqi.modules.sys.dict.dto.rsp.DictGradeResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

import java.util.List;

/**
 * 字典-年级转换
 *
 * @author: linkai
 * @date: 2023/05/03
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class DictGradeConvert {
    public abstract DictGradeEntity create(DictGradeCreateDTO s);

    public abstract DictGradeEntity update(DictGradeUpdateDTO s, @MappingTarget DictGradeEntity t);

    public abstract DictGradeEntity update(DictGradeUpdateDTO s);

    public abstract DictGradeResultDTO convert(DictGradeEntity s);

    public abstract List<DictGradeResultDTO> convert(List<DictGradeEntity> list);

}
